<script setup>

</script>

<template>
  <div class="app-container">
    <header class="header">
      <div class="nav-container">
        <div class="logo">
          MyBlog
        </div>
        <nav class="nav-links">
          <router-link to="/blogs" class="nav-link">博客列表</router-link>
          <!-- 可以添加更多导航链接 -->
        </nav>
      </div>
    </header>
    
    <main class="main-content">
      <router-view></router-view>
    </main>

    <footer class="footer">
      <p>&copy; 2024 MyBlog. All rights reserved.</p>
    </footer>
  </div>
</template>

<style scoped>
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.header {
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2c3e50;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background-color: #e9ecef;
}

.nav-link.router-link-active {
  color: #3498db;
  background-color: #e9ecef;
}

.main-content {
  max-width: 1200px;
  width: 100%;
  margin: 80px auto 2rem;
  padding: 2rem 1rem;
  flex: 1;
  background-color: #ffffff;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  border-radius: 8px;
}

.footer {
  background-color: #ffffff;
  padding: 1.5rem 0;
  text-align: center;
  color: #6c757d;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
  margin-top: auto;
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 0.5rem;
  }

  .main-content {
    padding: 1rem;
    margin-top: 70px;
  }

  .logo {
    font-size: 1.2rem;
  }
}
</style>